import React, { useState, useEffect } from "react";

import "./index.scss";

import * as THREE from "three";

import { RouteChildrenProps, Link } from "react-router-dom";

type props = {
  children: React.ReactNode
}

export default ({
  history,
  children,
}: RouteChildrenProps & props): JSX.Element => {
  useEffect(() => {console.log(45345)}, []);
  return (
    <div className="three">
      <p>three.js</p>
      <Link to='/threejs'>第一个3d场景</Link>
      <br></br>
      <Link to='/threejs/two'>旋转动画</Link>
      <br></br>
      <Link to='/threejs/three'>鼠标操作3D动画</Link>
      {children}
    </div>
  );
};
